import 'package:get/get.dart';
import 'package:meta/meta.dart';
import 'package:practice/net/server_api.dart';

class MainLogic extends GetxController {
  static MainLogic get to => Get.find<MainLogic>();

  @override
  void onInit(){
    super.onInit();
    ServerApi.news().then((value) {
      print(value.toString());
    }).catchError((error){
      print(error.toString());
    });
  }

}